home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
SPACE 1
/
SPACE - Library 1 - Volume 1.iso
/
telecomm
/
515
/
multi1_1
/
multiple.spt
next >
Wrap
Text File
|
1991-10-21
|
11KB
|
233 lines
;**************************************************************
SCRIPT 3 Download File(s) V 1.11
ECHO OFF Don't display commands
CLEAR Clear the screen
;delete previous download error text file.
IF EXIST "DLERROR.TXT" Does download error file exist?
;If a default path is desired place the path in the above line and
;below, an example is given.
;Provide the same path everywhere in the Script (3 places).
;ERASEFILE "DRIVE:\FOLDER1\FOLDER2\DLERROR.TXT"
ERASEFILE "DLERROR.TXT" Erase error file
ENDIF
NOTE
NOTE " Download File(s) Script"
NOTE " Version 1.11"
NOTE " by Fred H. Koch"
NOTE " [F.KOCH]"
NOTE " Modified By"
NOTE " Rob Mann "
NOTE " [R.MANN2]"
NOTE "This Script will download one or more files by entering the file"
NOTE "name or number. Multiple files must be separated by commas."
NOTE "The script will abort if a file is not found."
NOTE " This Script has been modified to work on the new GEnie Library "
NOTE " on Page 1075 for practice up and downloading."
:ENTER_LIBRARY
NOTE "Enter the library code or page number to use:"
NOTE
NOTE " ST for ST RT Library"
NOTE " AL for ST Aladdin RT Library"
NOTE " GL for GEnie Library "
;add additional library letter lists here and also below where indicated
NOTE
NOTE "Enter library to use:"
GETSTRING 1 Library to use
IF SUCCESS ESC not pressed
IF STRING 1 IS "" Blank string entered
NOTE
NOTE " Blank line entered try again."
NOTE
GOTO ENTER_LIBRARY Try again.
ENDIF
ELSE ESC pressed
CLEAR Clear the screen
NOTE
NOTE "Script aborted."
GOTO EXIT Exit script
ENDIF
IF STRING 1 IS "AL" ST Aladdin Library selected
SETSTRING 1 "1000;3" Download Aladdin Library file
GOTO ENTER_FILES
ENDIF
IF STRING 1 IS "al" ST Aladdin Library selected
SETSTRING 1 "1000;3" Download Aladdin Library file
GOTO ENTER_FILES
ENDIF
IF STRING 1 IS "ST" ST RT Library selected
SETSTRING 1 "475;3" Download ST Library file
GOTO ENTER_FILES
ENDIF
IF STRING 1 IS "st" ST RT Library selected
SETSTRING 1 "475;3" Download ST Library file
GOTO ENTER_FILES
ENDIF
;the next if statements are for adding a new library
IF STRING 1 IS "GL" use this for first library added
SETSTRING 1 "1075;4" enter the page number of the RT
GOTO ENTER_FILES
ENDIF
IF STRING 1 IS "gl" use lower case letters here
SETSTRING 1 "1075;4" enter the same page number
GOTO ENTER_FILES
ENDIF
;Additional RTs can be added by repeating the IF statements above with the
;appropriate identifying letters.
;This is based on all RTs having option 3 as library and option 6 as download
; except for page 1075 which has Library Option under #4, Actual Library
; Menu is the same as regular RTs.
SETSTRING 1 "%1;3" Set Library download option
:ENTER_FILES
NOTE
NOTE "Enter the file name(s) or number(s) to download. 75 characters max."
NOTE "Multiple files must be separated by commas. ESC to exit."
NOTE "___________________________________________________________________________"
GETSTRING 2 File(s) to download
IF SUCCESS ESC not pressed
IF STRING 2 IS "" Blank string entered
NOTE
NOTE " Blank line entered try again."
NOTE
GOTO ENTER_FILES Try again.
ENDIF
ELSE ESC pressed
CLEAR Clear the screen
NOTE
NOTE "Script aborted."
GOTO EXIT Exit script
ENDIF
IF STRING 2 HAS "," multiple file download
GOTO MULTIPLE skip to multiple file routine
ENDIF continue with single file download
NOTE
NOTE "Enter the file name for the description. RETURN with no name to"
NOTE "not save the file description. (No check for illegal file names)."
NOTE "If a path is entered with the file name it will be used. (ie A:\)"
NOTE "If no path is entered the default path will be used."
NOTE "Duplicate file names will be appended. ESC to exit."
NOTE
NOTE "Enter description file name (RETURN for none):"
GETSTRING 3 Description file name
IF SUCCESS ESC not pressed
:SINGLE
LOG ONTO "%1" Logon to Library
IF SUCCESS Logon successful
SENDLINE "6" Download option
WAITFORPROMPT Wait for file number request
SENDLINE "%2" Send file number to download
IF STRING 3 IS "" Blank string entered
GOTO DOWNLOAD Skip saving file description
ENDIF
IF STRING 3 HAS "\" Path entered with file name
CAPTURE "%3" Use entered path and file name
ELSE No path entered use default path
;For a default path use the line below instead of CAPTURE "%3"
;CAPTURE "DRIVE:\FOLDER1\FOLDER2\%3"
CAPTURE "%3" Open description file capture
ENDIF
:DOWNLOAD
WAITFORPROMPT Ready for download
IF CURRENTLINEHAS "Again" File not found
SENDLINE "N" don't try again
WAITFORPROMPT
ENDCAPTURE Close description file if open
LOG OFF Log off GEnie
NOTE
NOTE
NOTE "************************************************"
NOTE " File %2 not in this Library."
NOTE "************************************************"
GOTO EXIT Quit script
ELSE
SENDLINE "D" Tell GEnie ready to download
ENDCAPTURE Close description file capture, if open
WAITFOR "skip?" type download prompt
SENDLINE "4" download using Zmodem
;if a download path is desired other than the location of the
;Aladdin program, place the path in the next line and delete the ;
;ZMODEM DOWNLOAD DRIVE:\FOLDER1\FOLDER2\ path for downloaded files
WAITFORPROMPT download another file prompt
SENDLINE "n" don't download any more files
WAITFORPROMPT Ready to log off
ENDIF
ELSE Logon failed (busy)
NOTE "Log on failed. Enter Y to try again, anything else to exit."
NOTE "ESC will abort script at any time."
GETSTRING 4 Try again?
IF STRING 4 IS "Y" Try again!
GOTO SINGLE
ENDIF
IF STRING 4 IS "y" Try again!
GOTO SINGLE
ENDIF
ENDIF
ELSE ESC pressed
CLEAR Clear the screen
NOTE
NOTE "Script aborted."
GOTO EXIT Exit script
ENDIF File downloaded
GOTO LOG_OFF Script done log off
;Multiple file download
:MULTIPLE
LOG ONTO "%1" Log on to RT Library
IF SUCCESS Log on made
SENDLINE "6" Select download
WAITFORPROMPT Wait for download request
;If a default path is desired use the line below instead of
; CAPTURE "DLERROR.TXT". Be sure to provide the same path for the
; ERASEFILE commands above and below.
;CAPTURE "DRIVE:\FOLDER1\FOLDER2\DLERROR.TXT"
CAPTURE DLERROR.TXT File not found text file
SENDLINE "%2" Send file numbers to download
WAITFORPROMPT Ready for download type
IF CURRENTLINEHAS "Again" File not found
SENDLINE "N" don't try again
WAITFORPROMPT
ENDCAPTURE Close error file
LOG OFF Log off GEnie
NOTE
NOTE
NOTE "**********************************************************"
NOTE " One or more files in the list below not in this Library."
NOTE " %2"
NOTE " Browse DLERROR.TXT to see the first file not found."
NOTE "**********************************************************"
GOTO EXIT Quit script
ELSE Files found
ENDCAPTURE
SENDLINE "Z" zmodem
;If a download path is desired other than the location of the Aladdin
;program, place the path in the next line and delete the ;
;ZMODEM DOWNLOAD DRIVE:\FOLDER1\FOLDER2\ download path
WAITFORPROMPT Download complete
SENDLINE "n" No more files to download
WAITFORPROMPT Ready to logoff
ENDIF
ELSE Log on failed (busy)
NOTE "Log on failed. Enter Y to try again, anything else to exit."
NOTE "ESC will abort script at any time."
GETSTRING 4 Try again?
IF STRING 4 IS "Y" Try again!
GOTO MULTIPLE
ENDIF
IF STRING 4 IS "y" Try again!
GOTO MULTIPLE
ENDIF
ENDIF
:LOG_OFF
LOG OFF Logoff GEnie
IF EXIST "E:\GENIE\DOWNLOAD\DLERROR.TXT"
;if the DLERROR.TXT path was changed above, provide the same path here
;ERASEFILE "DRIVE:\FOLDER1\FOLDER2\DLERROR.TXT"
ERASEFILE "E:\GENIE\DOWNLOAD\DLERROR.TXT" Erase error file, no error
ENDIF
:EXIT Exit script
BEEP Sound bell
ENDSCRIPT